package com.fs.base.jpa.interf;

import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Predicate;
import javax.persistence.criteria.Root;

/**
 * @author TiddlerCJ
 */
public interface QueryOpt {
	/**
	 * 请求参数字段查询方式词尾后缀
	 */
	public static String QUERY_POSTFIX = "_searchType";
	/*
	 * 操作符定义
	 */
	public enum Operator {
		EQ, NE, LIKE, GT, LT, GTE, LTE, AND, OR,IN
	}

	public Predicate toPredicate(Root<?> root, CriteriaQuery<?> query,CriteriaBuilder builder);
}
